<%@ page pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/includes/directives/page.jspf"%>
<%@ include file="/WEB-INF/views/includes/directives/taglib.jspf"%>
<bach:initRecommendBean var="recsBean" recType="nav" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/views/includes/include_js_css.jspf"%>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>${item.name}</title>
</head>
<body>
	<div id="main_container">
		<%@ include file="/WEB-INF/views/includes/header.jspf"%>
		<%@ include file="/WEB-INF/views/includes/category_menu.jspf"%>
		<div id="content">
			<div id="item_name">${itemViewBean.name}</div>
			<c:choose>
				<c:when test="${itemViewBean.isAvailable}">
					<div id="container_form_by_item">
						<form action="#" method="post" id="by_item_form">
							<input class="input_huge form_input" type="text"
								name="itemQuantity" value="1"> <input type="hidden"
								name="itemId" value="${itemViewBean.id}">

							<button class="button" type="button" onclick="addToCart()">
								<fmt:message key="view_item_jsp.button.buy" />
							</button>
						</form>
					</div>

					<div id="item_price">
						<fmt:formatNumber type="number" value="${itemViewBean.price}" />
						<fmt:message key="view_item_jsp.label.hryn" />
					</div>
				</c:when>
				<c:otherwise>
					<div id="out_of_stock_message" class="out_of_stock">
						<fmt:message key="view_item_jsp.label.out_of_stock" />
					</div>

					<div id="item_price" class="out_of_stock">
						<fmt:formatNumber type="number" value="${itemViewBean.price}" />
						<fmt:message key="view_item_jsp.label.hryn" />
					</div>
				</c:otherwise>
			</c:choose>
			<div id="item_description">${itemViewBean.description}</div>
			<%@ include file="/WEB-INF/views/includes/recommendations.jspf"%>
		</div>
		<div id="free_space"></div>
	</div>
	<%@ include file="/WEB-INF/views/includes/footer.jspf"%>
</body>
</html>